package org.xlab.dictionary.dao;

import java.util.Set;

import org.xlab.dictionary.domain.Type;

public interface ITypeDao extends IGenericDao<Integer, Type> {

	Type create(Type entity, Integer supertypeId) throws DaoException;

	Type create(Type entity, String supertypeName) throws DaoException;

	Type readByName(String name) throws DaoException;

	void deleteByName(String name) throws DaoException;

	Type getSupertypeByName(String name) throws DaoException;

	Type getSupertype(Integer id) throws DaoException;

	Set<Type> getSubtypesByName(String name) throws DaoException;

	Set<Type> getSubtypes(Integer id) throws DaoException;

	boolean instanceOf(Integer id, Integer supertypeId) throws DaoException;

	boolean instanceOf(String name, String supertypeName) throws DaoException;

}
